/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.chartsy.bop;
import java.beans.PropertyEditorSupport;
import java.util.logging.Level;
import org.chartsy.main.chart.AbstractPropertiesNode;
import org.chartsy.main.utils.SerialVersion;
import org.openide.nodes.Sheet;
/**
*
* @author joshua.taylor
*/
public class IndicatorNode extends AbstractPropertiesNode
{
private static final long serialVersionUID = SerialVersion.APPVERSION;
public IndicatorNode()
{
super("BOP Properties");
}
public IndicatorNode(IndicatorProperties indicatorProperties)
{
super("BOP Properties", indicatorProperties);
}
@SuppressWarnings("unchecked")
protected @Override Sheet createSheet()
{
Sheet sheet = Sheet.createDefault();
Sheet.Set set = getPropertiesSet();
sheet.put(set);
try
{
// Label
set.put(getProperty(
"Label", // property name
"Sets the label", // property description
IndicatorProperties.class, // properties class
String.class, // property class
PropertyEditorSupport.class, // property editor class (null if none)
"getLabel", // get method name
"setLabel", // set method name
IndicatorProperties.LABEL // default property value
));
// Marker Visibility
set.put(getProperty(
"Marker Visibility", // property name
"Sets the marker visibility", // property description
IndicatorProperties.class, // properties class
boolean.class, // property class
null, // property editor class (null if none)
"getMarker", // get method name
"setMarker", // set method name
IndicatorProperties.MARKER // default property value
));
}
catch (NoSuchMethodException ex)
{
LOG.log(Level.SEVERE, "[BOP Node] : Method does not exist.", ex);
}
return sheet;
}
}